<script>
function MascaraCEP(campo, teclaPress) {
	  if (window.event){
	    var tecla = teclaPress.keyCode;
	  } else {
	    tecla = teclaPress.which;
	  }
	  var s = new String(campo.value);
	  s = s.replace(/(\.|\(|\)|\/|\-| )+/g,'');
	  tam = s.length + 1;
	  if (tam > 5 && tam < 7)
	    campo.value = s.substr(0,5) + '-' + s.substr(5, tam);
	}

	function soNumeros(event){
	  if (window.event) {
	    // IE
	    key = event.keyCode;
	  } 
	  else if (event.which) {
	    // netscape
	    key = event.which;
	  }
	  if (key != 8 || key != 13 || key < 48 || key > 57)
	    return (((key > 47) && (key < 58)) || (key == 8 ) || (key == 13));
	    return true;
	}
	
	function MascaraData(campo, teclaPress){
		if (window.event){
		    var tecla = teclaPress.keyCode;
		  } else {
		    tecla = teclaPress.which;
		  }
		  var s = new String(campo.value);
		 
		  tam = s.length + 1;
		  if (tam > 3 && tam < 7)
		    campo.value = s.substr(0,2) + '/' +s.substr(3,4) ;
		  if (tam > 5 && tam < 7)
			  campo.value = s.substr(0,2) + '/' +s.substr(3,4) + '/'+ s.substr(5, tam);
	}
	
	function ValidaData(data){
		exp = /\d{2}\/\d{2}\/\d{4}/
		if(!exp.test(data.value))
			alert('Data Invalida!');			
	}
	

	function data2(campo, nome,teclaPress){
		
		if (window.event){
		    var tecla = teclaPress.keyCode;
		  } else {
		    tecla = teclaPress.which;
		  }
		  var s = new String(nome);2010-32-12
		// nascimento
		if (formato=='nascimento'){
		separador = '/'; 
		conjunto1 = 2;
		conjunto2 = 5;
		s.replace("-","");
		campo.value=s.substr(7,8)+ '/' +s.substr(5,6) + '/'+ s.substr(0, 4);
		}
	}


	
</script>